package bean;

import utils.*;

public class OutpatientAppointment {
    String Outpatient_id; //预约id
    String appointment_date; //预约日期
    String appointment_time; //预约时间
    String  patient_name; //病人名字
    String patient_gender;
    String patient_age;
    String doctor_name; //医生名字
    String appointment_status = "排队中"; //默认排队中
    String created_time; //预约创建时间
    String IdNumber; //病人身份证号
    String Emergency;//急门诊
    String Sign_in_situation;//病人签到情况
    String serialnumber ; // 排队序号，不插入数据库，只作为一个属性
    Doctor doctor; //医生对象，后续通过医生名字查询
    Float queue_weight;//排队权值



    public OutpatientAppointment() {
    }

    public OutpatientAppointment(String outpatient_id, String appointment_date, String appointment_time, String patient_name, String patient_gender, String patient_age, String doctor_name, String appointment_status, String created_time, String idNumber, String emergency, String sign_in_situation, String serialnumber, Doctor doctor) {
        Outpatient_id = outpatient_id;
        this.appointment_date = appointment_date;
        this.appointment_time = appointment_time;
        this.patient_name = patient_name;
        this.patient_gender = patient_gender;
        this.patient_age = patient_age;
        this.doctor_name = doctor_name;
        this.appointment_status = appointment_status;
        this.created_time = created_time;
        IdNumber = idNumber;
        Emergency = emergency;
        Sign_in_situation = sign_in_situation;
        this.serialnumber = serialnumber;
        this.doctor = doctor;
    }

    public String getOutpatient_id() {
        return Outpatient_id;
    }

    public void setOutpatient_id(String outpatient_id) {
        Outpatient_id = outpatient_id;
    }

    public String getAppointment_date() {
        return appointment_date;
    }

    public void setAppointment_date(String appointment_date) {
        this.appointment_date = appointment_date;
    }

    public String getAppointment_time() {
        return appointment_time;
    }

    public void setAppointment_time(String appointment_time) {
        this.appointment_time = appointment_time;
    }

    public String getPatient_name() {
        return patient_name;
    }

    public void setPatient_name(String patient_name) {
        this.patient_name = patient_name;
    }

    public String getPatient_gender() {
        return patient_gender;
    }

    public void setPatient_gender(String patient_gender) {
        this.patient_gender = patient_gender;
    }

    public String getPatient_age() {
        return patient_age;
    }

    public void setPatient_age(String patient_age) {
        this.patient_age = patient_age;
    }

    public String getDoctor_name() {
        return doctor_name;
    }

    public void setDoctor_name(String doctor_name) {
        this.doctor_name = doctor_name;
    }

    public String getAppointment_status() {
        return appointment_status;
    }

    public void setAppointment_status(String appointment_status) {
        this.appointment_status = appointment_status;
    }

    public String getCreated_time() {
        return created_time;
    }

    public void setCreated_time(String created_time) {
        this.created_time = created_time;
    }

    public String getIdNumber() {
        return IdNumber;
    }

    public void setIdNumber(String idNumber) {
        IdNumber = idNumber;
    }

    public String getEmergency() {
        return Emergency;
    }

    public void setEmergency(String emergency) {
        Emergency = emergency;
    }

    public String getSign_in_situation() {
        return Sign_in_situation;
    }

    public void setSign_in_situation(String sign_in_situation) {
        Sign_in_situation = sign_in_situation;
    }

    public String getSerialnumber() {
        return serialnumber;
    }

    public void setSerialnumber(String serialnumber) {
        this.serialnumber = serialnumber;
    }

    public Doctor getDoctor() {
        return doctor;
    }

    public void setDoctor(Doctor doctor) {
        this.doctor = doctor;
    }
    public Float getQueue_weight() {
        //年龄和急门诊占比各50%
        int age_weight = weight.age_weight(Integer.parseInt(this.patient_age));
        int emergency_weight = weight.emergency_weight(this.Emergency);
        this.queue_weight = (float) (age_weight*0.5+emergency_weight*0.5);
        return 100- queue_weight;
    }

    public void setQueue_weight() {

    }
    @Override
    public String toString() {
        return "OutpatientAppointment{" +
                "Outpatient_id='" + Outpatient_id + '\'' +
                ", appointment_date='" + appointment_date + '\'' +
                ", appointment_time='" + appointment_time + '\'' +
                ", patient_name='" + patient_name + '\'' +
                ", patient_gender='" + patient_gender + '\'' +
                ", patient_age='" + patient_age + '\'' +
                ", doctor_name='" + doctor_name + '\'' +
                ", appointment_status='" + appointment_status + '\'' +
                ", created_time='" + created_time + '\'' +
                ", IdNumber='" + IdNumber + '\'' +
                ", Emergency='" + Emergency + '\'' +
                ", Sign_in_situation='" + Sign_in_situation + '\'' +
                ", serialnumber='" + serialnumber + '\'' +
                ", doctor=" + doctor +
                '}';
    }
}
